home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Timothy Knox / UPMAIL Prolog 0.9b / HINTS next >
Text File  |  1994-06-24  |  2KB  |  16 lines

  1. This is a terse description of some nonstandard features of UPMAIL Prolog.
  2.  
  3. To change the memory used, examine the STR# resource with ResEdit; all units are in kbytes except "Margin" which you should not touch anyway.
  4.  
  5. There is a predicate garbage_collect/0 that initiates an immediate garbage collection of the heap (no code area gc yet, sorry). Normally you would never call this, as it is called automatically for you. (Never use command-. during a gc, it will bring up the Prolog debugger and shortly thereafter MacsBug :-)
  6.  
  7. Interprocess communication over AppleTalk with ADSP streams are supported. Try open(appletalk('Foo'),io,Stream) in two running UPMAIL Prologs (on different machines); in each Prolog this will bind Stream to a stream that can be used for input and output with the other Prolog. Use nl(Stream), or flush(Stream) to flush the data to the other end. The predicate peek/1 can be used on any kind of stream to determine whether there is any data available; it will succeed also if the stream was closed by the other side, in that case get0 and friends will return -1 (end of file).
  8. If there are no data available then get/1 and get0/1 etc will hang waiting for the data to arrive. If you use read/2 on a ADSP stream, then it will wait until a complete prolog term is available.
  9. It is actually possible to communicate between two Prologs on the same machine using SetSelfSend or a similar utility. It is also possible to use the ADSP streams to talk to HyperCard/SuperCard, those XCMDs will be available shortly.
  10.  
  11. Calling prolog::plWAM(<filename>) produces symbolic WAM code, this might be instructional.
  12.  
  13. Use 'h' in the debugger to list the commands available.
  14.  
  15. We may make a manual available real soon now...
  16.